<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/WEB-INF/jsp/commons/taglibs.jsp" %>
<!-- 分页显示演示开始 -->
<form id="listForm" class="well form-search" action="${ctx}/adoms/department/list" method="get">
    <input type="hidden" name="pageNo" id="pageNo" value="${pageData.pagination.pageNo}"/>
    <input type="hidden" name="fieldName" id="fieldName" value="${pageData.compositor.fieldName}"/>
    <input type="hidden" name="compositorType" id="compositorType" value="${pageData.compositor.compositorType}"/>
    <table class="table table-striped table-bordered table-condensed">
        <tr align="center">
            <th>
                部门名称|部门编号
                <y:search fieldType="S" fieldList="name,memo" matchType="LIKE" className="input-medium search-query"/>
                <button class="btn btn-small" onclick="search()" type="button">
                    <i class="icon-search"></i>
                    搜索
                </button>
                <a href="${ctx}/adoms/department/new" class="btn btn-small right">添加部门</a>
            </th>
        </tr>
    </table>
</form>
<table class="table table-striped table-bordered table-condensed">
    <thead>
    <tr>
        <th>#</th>
        <th>
            <a href="javascript:sort('name')">部门名称</a>
        </th>
        <th>
            <a href="javascript:sort('code')">部门编号</a>
        </th>
        <th>
            <a href="javascript:sort('addrArea')">区域</a>
        </th>
        <th>
            <a href="javascript:sort('addrRegion')">县/区</a>
        </th>
        <th>
            <a href="javascript:sort('addrCity')">城市</a>
        </th>
        <th>
            <a href="javascript:sort('addrProvince')">省份</a>
        </th>
        <th>
            <a href="javascript:sort('addrDetail')">详细地址</a>
        </th>
        <th>
            <a href="javascript:sort('contactor')">联系人</a>
        </th>
        <th>
            <a href="javascript:sort('contactorPhone1')">联系电话</a>
        </th>
        <th>
            <a href="javascript:sort('directShipper')">物流名称</a>
        </th>
        <th>
            <a href="javascript:sort('roadMap')">乘车路线</a>
        </th>
        <th>
            <a href="javascript:sort('type')">部门类型</a>
        </th>
        <th>
            <a href="javascript:sort('department')">上级部门</a>
        </th>
        <th>
            <a href="javascript:sort('zipCode')">邮编</a>
        </th>
        <th>
            <a href="javascript:sort('memo')">备注</a>
        </th>
        <th>
            <a href="javascript:sort('insertTime')">添加时间</a>
        </th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach var="entity" items="${pageData.result}" varStatus="index">
        <tr <c:if test="${!entity.visible}">bgcolor="#AFEEEE"</c:if>>
            <td>${index.index + 1}</td>
            <td>${entity.name}</td>
            <td>${entity.code}</td>
            <td>${entity.addrArea}</td>
            <td>${entity.addrRegion}</td>
            <td>${entity.addrCity}</td>
            <td>${entity.addrProvince}</td>
            <td>${entity.addrDetail}</td>
            <td>${entity.contactor}</td>
            <td>${entity.contactorPhone1}</td>
            <td>${entity.directShipper}</td>
            <td>${entity.roadMap}</td>
            <td>${entity.type.name}</td>
            <td>${entity.department.name}</td>
            <td>${entity.zipCode}</td>
            <td>${entity.memo}</td>
            <td>
                <fmt:formatDate value="${entity.insertTime}" pattern="yyyy-MM-dd"/>
            </td>
            <td>
                <a href="${ctx}/adoms/department/edit/${entity.id}">修改</a>
                |
                <a href="${ctx}/adoms/department/delete/${entity.id}" confirm="删除后无法恢复,确定要删除吗?">刪除</a>
            </td>
        </tr>
    </c:forEach>
    </tbody>
</table>
<%@ include file="/WEB-INF/jsp/commons/pager.jsp" %>